package com.company.test;

import com.company.bean.Red;
import com.company.config.MainConfigOfAutowired;
import com.company.config.MainConfigOfLifeCycle;
import com.company.config.MainConfigValue;
import com.company.dao.BookDao;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class IOC_testAutoWoried {
    @Test
    public void test1() {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfigOfAutowired.class);

//        BookDao bookDao =applicationContext.getBean(BookDao.class);

        Red red = applicationContext.getBean(Red.class);
    }
}
